home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cvs / sprite / RCS / cvs.h,v < prev    next >
Encoding:
Text File  |  1991-08-20  |  6.1 KB  |  241 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     91.08.20.12.58.34;  author jhh;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     91.07.29.11.49.08;  author jhh;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     91.06.24.16.11.00;  author jhh;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.3
  30. log
  31. @allow $Header in files
  32. @
  33. text
  34. @/*    $Id: cvs.h,v 1.2 91/07/29 11:49:08 jhh Exp Locker: jhh $    */
  35.  
  36. #include <strings.h>
  37. #include <string.h>
  38. #include <stdio.h>
  39. #ifdef sprite
  40. #include <sys/dir.h>
  41. #endif
  42. /*
  43.  *    Copyright (c) 1989, Brian Berliner
  44.  *
  45.  *    You may distribute under the terms of the GNU General Public License
  46.  *    as specified in the README file that comes with the CVS 1.0 kit.
  47.  *
  48.  * Definitions for the CVS Administrative directory and
  49.  * the files it contains.  Here as #define's to make changing
  50.  * the names a simple task.
  51.  */
  52. #define    CVSADM        "CVS.adm"
  53. #define    CVSADM_ENT    "CVS.adm/Entries"
  54. #define    CVSADM_ENTBAK    "CVS.adm/Entries.Backup"
  55. #define    CVSADM_ENTSTAT    "CVS.adm/Entries.Static"
  56. #define    CVSADM_FILE    "CVS.adm/Files"
  57. #define    CVSADM_MOD    "CVS.adm/Mod"
  58. #define    CVSADM_REP    "CVS.adm/Repository"
  59. #define    CVSADM_CIPROG    "CVS.adm/Checkin.prog"
  60.  
  61. /*
  62.  * Definitions for the CVSROOT Administrative directory and
  63.  * the files it contains.  This directory is created as a
  64.  * sub-directory of the $CVSROOT environment variable, and holds
  65.  * global administration information for the entire source
  66.  * repository beginning at $CVSROOT.
  67.  */
  68. #define    CVSROOTADM        "CVSROOT.adm"
  69. #define    CVSROOTADM_MODULES    "CVSROOT.adm/modules"
  70. #define    CVSROOTADM_LOGINFO    "CVSROOT.adm/loginfo"
  71.  
  72. /* support for the CVSROOTADM files */
  73. #define    CVSMODULE_FILE    "modules" /* last component of CVSROOTADM_MODULES */
  74. #define    CVSMODULE_TMP    ".#modules.XXXXXX"
  75. #define    CVSMODULE_OPTS    "ai:o:t:"
  76. #define    CVSLOGINFO_FILE    "loginfo" /* last component of CVSROOTADM_LOGINFO */
  77. #define    CVSLOGINFO_TMP    ".#loginfo.XXXXXX"
  78.  
  79. /* Other CVS file names */
  80. #define    CVSATTIC    "Attic"
  81. #define    CVSLCK        "#cvs.lock"
  82. #define    CVSTFL        "#cvs.tfl"
  83. #define    CVSRFL        "#cvs.rfl"
  84. #define    CVSWFL        "#cvs.wfl"
  85. #define    CVSEXT_OPT    ",p"
  86. #define    CVSEXT_LOG    ",t"
  87. #define    CVSPREFIX    ",,"
  88. #define    CVSTEMP        "/tmp/cvslog.XXXXXX"
  89.  
  90. /* miscellaneous CVS defines */
  91. #define    CVSEDITPREFIX    "CVS: "
  92. #define    CVSLCKAGE    600        /* 10-min old lock files cleaned up */
  93. #define    CVSLCKSLEEP    15        /* wait 15 seconds before retrying */
  94. #define    DFLT_RECORD    "/dev/null"
  95. #define    BAKPREFIX    ".#"        /* when rcsmerge'ing */
  96. #define    DEVNULL        "/dev/null"
  97.  
  98. #define    FALSE        0
  99. #define    TRUE        1
  100.  
  101. /*
  102.  * Definitions for the RCS file names.
  103.  */
  104. #define    RCS        "rcs"
  105. #define    RCS_CI        "ci"
  106. #define    RCS_CO        "co"
  107. #define    RCS_RLOG    "rlog"
  108. #define    RCS_DIFF    "rcsdiff"
  109. #define    RCS_MERGE    "rcsmerge"
  110. #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  111. #define    RCSID_PAT    "\"\\(\\$Id.*\\)\\|\\(\\$Header.*\\)\"" /* when committing files */
  112. #define    RCSEXT        ",v"
  113. #define    RCSHEAD        "head"
  114. #define    RCSBRANCH    "branch"
  115. #define    RCSSYMBOL    "symbols"
  116. #define    RCSDATE        "date"
  117. #define    RCSDESC        "desc"        /* ends the search for branches */
  118. #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  119.  
  120. /* Programs that cvs runs */
  121. #define    DIFF        "/bin/diff"
  122. #define    GREP        "/bin/grep"
  123. #define    RM        "/bin/rm"
  124. #define    SORT        "/usr/bin/sort"
  125.  
  126. /*
  127.  * Environment variable used by CVS
  128.  */
  129. #define    CVSREAD_ENV    "CVSREAD"    /* make files read-only */
  130. #define    CVSREAD_DFLT    FALSE        /* writable files by default */
  131.  
  132. #define    RCSBIN_ENV    "RCSBIN"    /* RCS binary directory */
  133. #define    RCSBIN_DFLT    "/sprite/cmds" /* directory to find RCS progs */
  134.  
  135. #define    EDITOR_ENV    "EDITOR"    /* which editor to use */
  136. #define    EDITOR_DFLT    "/sprite/cmds/vi"    /* somewhat standard */
  137.  
  138. #define    CVSROOT_ENV    "CVSROOT"    /* source directory root */
  139. #define    CVSROOT_DFLT    NULL        /* No dflt; must set for checkout */
  140.  
  141. /*
  142.  * If the beginning of the Repository matches the following string,
  143.  * strip it so that the output to the logfile does not contain a full pathname.
  144.  *
  145.  * If the CVSROOT environment variable is set, it overrides this define.
  146.  */
  147. #define    REPOS_STRIP    "/src/master/"
  148.  
  149. /*
  150.  * The maximum number of files per each CVS directory.
  151.  * This is mainly for sizing arrays statically rather than
  152.  * dynamically.  3000 seems plenty for now.
  153.  */
  154. #define    MAXFILEPERDIR    3000
  155. #define    MAXLINELEN    1000        /* max input line from a file */
  156. #define    MAXPROGLEN    30000        /* max program length to system() */
  157. #define    MAXLISTLEN    20000        /* For [A-Z]list holders */
  158. #define    MAXMESGLEN    1000        /* max RCS log message size */
  159.  
  160. /*
  161.  * The type of request that is being done in do_module() &&
  162.  * the type of request that is being done in Find_Names().
  163.  */
  164. enum mtype { CHECKOUT, TAG, PATCH };
  165. enum ftype { ALL, ALLPLUSATTIC, MOD };
  166.  
  167. extern char *progname, *command;
  168. extern char Clist[], Glist[], Mlist[], Olist[], Dlist[];
  169. extern char Alist[], Rlist[], Wlist[], Llist[], Blist[];
  170. extern char User[], Repository[], SRepository[], Rcs[];
  171. extern char VN_User[], VN_Rcs[], TS_User[], TS_Rcs[];
  172. extern char Options[], Tag[], Date[], prog[];
  173. extern char *Rcsbin, *Editor, *CVSroot;
  174. extern int really_quiet, quiet;
  175. extern int use_editor;
  176. extern int cvswrite;
  177. extern int force_tag_match;
  178.  
  179. extern int fileargc;            /* for Find_Names() */
  180. extern char *fileargv[];
  181.  
  182. /*
  183.  * Externs that are included directly in the CVS sources
  184.  */
  185. extern FILE *open_file();
  186. extern char *xmalloc();
  187. extern int ppstrcmp();
  188. extern int ppstrcmp_files();
  189. extern void Lock_Cleanup();
  190.  
  191. /*
  192.  * Externs that are included in libc, but are used frequently
  193.  * enough to warrant defining here.
  194.  */
  195. extern char *sprintf();
  196. extern char *optarg;            /* for getopt() support */
  197. extern char *getwd();
  198. extern char *re_comp();
  199. extern int optind;
  200.  
  201. #ifdef sprite
  202. #define dirent direct
  203. #endif
  204. @
  205.  
  206.  
  207. 1.2
  208. log
  209. @sprite has commands in different places, also readdir returns direct
  210. rather than dirent
  211. @
  212. text
  213. @d1 1
  214. a1 1
  215. /*    $Id: cvs.h,v 1.1 91/06/24 16:11:00 jhh Exp Locker: jhh $    */
  216. d78 1
  217. a78 1
  218. #define    RCSID_PAT    "'\\$Id.*\\$'"    /* when committing files */
  219. @
  220.  
  221.  
  222. 1.1
  223. log
  224. @Initial revision
  225. @
  226. text
  227. @d1 1
  228. a1 1
  229. /*    $Id: cvs.h,v 1.24.1.1 91/01/18 12:13:48 berliner Exp $    */
  230. d6 3
  231. a8 1
  232.  
  233. d100 1
  234. a100 1
  235. #define    RCSBIN_DFLT    "/usr/local/bin" /* directory to find RCS progs */
  236. d103 1
  237. a103 1
  238. #define    EDITOR_DFLT    "/usr/ucb/vi"    /* somewhat standard */
  239. d167 4
  240. @
  241.